﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Coldairarrow.Entity.Interface
{
    /// <summary>
    /// 易仓入库明细
    /// </summary>
    /// 

    public class ReceiveDetailDTO
    {
        public string code { get; set; }
        public string message { get; set; }
        public string requestId { get; set; }
        public long timestamp { get; set; }
        public string version { get; set; }
        public string nonce_str { get; set; }
        public string sign_type { get; set; }
        public string sign { get; set; }
        public string biz_content { get; set; }

    }


    public class ReceiveDetailDTO_Data
    {
        public string total { get; set; }
        public string pi_id { get; set; }
        public int page { get; set; }
        public int page_size { get; set; }
        public List<ReceiveDetail> data { get; set; }
    }

    public class ReceiveDetail
    {
        /// <summary>
        /// 入库唯一明细id
        /// </summary>
        public string rl_id { get; set; }
        public string RowId { get; set; }


        /// <summary>
        /// 单据编号
        /// </summary>
        public string reference_no { get; set; }
        /// <summary>
        /// 关联单号（待上线）
        /// </summary>
        public string relation_code { get; set; }
        /// <summary>
        /// 中转仓库ID
        /// </summary>
        public string warehouse_id { get; set; }

        /// <summary>
        /// 目的仓库ID	
        /// </summary>
        public string to_warehouse_id { get; set; }
        /// <summary>
        /// 仓库代码
        /// </summary>
        public string warehouse_code { get; set; }
        /// <summary>
        /// 库位	
        /// </summary>
        public string lc_code { get; set; }
        /// <summary>
        /// 创建人
        /// </summary>
        public string add_user { get; set; }
        /// <summary>
        /// 确定人	
        /// </summary>
        public string receiving_add_user { get; set; }


        /// <summary>
        /// 操作类型
        /// </summary>
        private string _application_code;
        public string application_code
        {
            get
            {
                return _application_code;
            }

            set
            {
                if (value == "Putaway") _application_code = "草稿";
                else if (value == "EO") _application_code = "待处理";
                else if (value == "MO") _application_code = "处理中";
                else if (value == "SO") _application_code = "处理完成";
                else if (value == "CU") _application_code = "出库单出库";
                else if (value == "uploadProductInventory") _application_code = "导入库存";
                else if (value == "take_stock") _application_code = "盘点";
                else if (value == "transfer") _application_code = "中转调拨";
                else if (value == "TSO") _application_code = "中转调拨转入";
                else if (value == "TB") _application_code = "良品转次品";
                else if (value == "SSPI") _application_code = "同步服务商库存";
                else if (value == "OSAPI") _application_code = "同步添加库存";
                else if (value == "CURETURNED") _application_code = "在库退货";
                else if (value == "CUEXCHANGE") _application_code = "在库换货";
                else if (value == "CUR") _application_code = "出库单入库";
                else if (value == "QcExchange") _application_code = "QC异常换货";
                else if (value == "QcDestroy") _application_code = "QC异常销毁";
                else if (value == "confirmRefund") _application_code = "退货";
                else if (value == "SFDP") _application_code = "次品上架";
                else if (value == "Allot") _application_code = "调拨";
                else if (value == "AFSO") _application_code = "调整头程出货单";
                else if (value == "FBA") _application_code = "同步缺货订单";
                else _application_code = value;
            }

        }

        /// <summary>
        /// 入库单类型	
        /// </summary>
        public string receiving_type { get; set; }
        /// <summary>
        /// 产品代码	
        /// </summary>
        public string product_barcode { get; set; }
        /// <summary>
        /// 产品中文名称	
        /// </summary>
        public string product_title { get; set; }
        /// <summary>
        /// 产品单位	
        /// </summary>
        private string _pu_code;
        public string pu_code
        {
            get
            {
                return _pu_code;
            }

            set
            {
                if (value == "EA") _pu_code = "个";
                else if (value == "KG") _pu_code = "公斤";
                else if (value == "MT") _pu_code = "米";
                else if (value == "CASE") _pu_code = "盒";
                else if (value == "PC") _pu_code = "件";
                else if (value == "SET") _pu_code = "套";
                else _pu_code = value;
            }

        }
        /// <summary>
        /// 是否含有电池	
        /// </summary>
        private string _contain_battery;
        public string contain_battery
        {
            get
            {
                return _contain_battery;
            }

            set
            {
                if (value == "0") _contain_battery = "否";
                else if (value == "1") _contain_battery = "是";
                else _contain_battery = value;
            }

        }

        /// <summary>
        /// 是否需要质检
        /// </summary>
        private string _product_is_qc;
        public string product_is_qc
        {
            get
            {
                return _product_is_qc;
            }

            set
            {
                if (value == "0") _product_is_qc = "否";
                else if (value == "1") _product_is_qc = "是";
                else _product_is_qc = value;
            }

        }

        /// <summary>
        /// 是否为仿制品	
        /// </summary>
        private string _is_imitation;
        public string is_imitation
        {
            get
            {
                return _is_imitation;
            }

            set
            {
                if (value == "0") _is_imitation = "否";
                else if (value == "1") _is_imitation = "是";
                else _is_imitation = value;
            }

        }

        /// <summary>
        /// 是否存在有效期	
        /// </summary>
        private string _is_exp_date;
        public string is_exp_date
        {
            get
            {
                return _is_exp_date;
            }

            set
            {
                if (value == "0") _is_exp_date = "否";
                else if (value == "1") _is_exp_date = "是";
                else _is_exp_date = value;
            }

        }

        /// <summary>
        /// 有效期
        /// </summary>
        public string exp_date { get; set; }

        /// <summary>
        /// 一级品类pc_id
        /// </summary>
        public string category1 { get; set; }

        /// <summary>
        /// 二级品类pc_id
        /// </summary>
        public string category2 { get; set; }

        /// <summary>
        /// 三级品类pc_id
        /// </summary>
        public string category3 { get; set; }

        /// <summary>
        /// 仓库条码	
        /// </summary>
        public string warehouse_product_barcode { get; set; }
        /// <summary>
        /// 供应商代码	
        /// </summary>
        public string supplier_code { get; set; }
        /// <summary>
        /// 采购单号
        /// </summary>
        public string po_code { get; set; }
        /// <summary>
        /// 采购单审核日期	
        /// </summary>
        public string po_release { get; set; }
        /// <summary>
        /// 是否是采购退货
        /// </summary>
        private string _is_returned;
        public string is_returned
        {
            get
            {
                return _is_returned;
            }

            set
            {
                if (value == "0") _is_returned = "否";
                else if (value == "1") _is_returned = "是";
                else _is_returned = value;
            }

        }
        /// <summary>
        /// 收货过多退货数量	
        /// </summary>
        public string receiving_returned_qty { get; set; }

        /// <summary>
        /// 质检退货数量	
        /// </summary>
        public string qc_returned_qty { get; set; }
        /// <summary>
        /// 数量	
        /// </summary>
        public string quantity { get; set; }
        /// <summary>
        /// 目标采购价	
        /// </summary>
        public string org_unit_price { get; set; }
        /// <summary>
        /// 单价	
        /// </summary>
        public string unit_price { get; set; }
        /// <summary>
        /// 运费	
        /// </summary>
        public string shipping_fee { get; set; }
        /// <summary>
        /// 关税	
        /// </summary>
        public string tariff_fee { get; set; }
        /// <summary>
        /// 采购运费	
        /// </summary>
        public string unit_purchase_ship_fee { get; set; }
        /// <summary>
        /// 采购税费	
        /// </summary>
        public string unit_purchase_taxation_fee { get; set; }
        /// <summary>
        /// 成本小计	
        /// </summary>
        public string total { get; set; }
        /// <summary>
        /// 入库时间	
        /// </summary>
        public string add_time { get; set; }
        /// <summary>
        /// 收货备注	
        /// </summary>
        public string receiving_description { get; set; }

    }
}
